package com.peas.platform.module.icims.base.auth.adapter.repository.po;

import java.util.*;
import java.math.*;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.peas.platform.framework.mybatisplus.po.BasePo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

// 用户登录记录
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "`tbl_user_login`")
public class UserLoginPo extends BasePo {

    //用户表ID
    //外键
    @NotNull(message = "用户表ID不能为空")
    @TableField(value = "`user_id`", jdbcType = JdbcType.BIGINT)
    private Long userId;

    //状态
    @NotBlank(message = "状态不能为空")
    @Size(max = 20, message = "状态不能超过20个字符")
    @TableField(value = "`state`", jdbcType = JdbcType.VARCHAR)
    private String state;

    //登录时间
    @TableField(value = "`login_time`", jdbcType = JdbcType.TIMESTAMP)
    private Date loginTime;

    //登录IP
    @Size(max = 15, message = "登录IP不能超过15个字符")
    @TableField(value = "`login_ip`", jdbcType = JdbcType.VARCHAR)
    private String loginIp;

}
